Data compression

ABSTRACT

Methods, systems, and apparatus, including computer programs encoded on a computer storage medium, for compressing rows of data stored in a first matrix using run length encoding (RLE) to produce an RLE encoded matrix. Compressing columns of the RLE encoded matrix into a set of arrays by differentially encoding data count values of the RLE encoded matrix, wherein each array in the set of arrays represents a column of the RLE encoded matrix.

BACKGROUND

High-resolution representations of spatial data such as geographic mapsand map overlays can be used to quickly visualize large amounts of data.Processing spatial data representations can become computationallyinefficient and storing or transferring such data can requiresignificant memory and bandwidth resources.

SUMMARY

This specification relates to techniques for efficiently processing datarepresented in matrix form. More specifically, implementations of thepresent specification relate to techniques for processing data matricesthat contain repetitive data such as representations of spatialpolygonal data. Implementations take advantage of repetitive data tocompress both rows and columns of a matrix into a highly compact set ofarrays.

In general, innovative aspects of the subject matter described in thisspecification can be embodied in methods that include the actions ofcompressing rows of data stored in a first matrix using run lengthencoding (RLE) to produce an RLE encoded matrix. Compressing columns ofthe RLE encoded matrix into a set of arrays by differentially encodingdata count values of the RLE encoded matrix, wherein each array in theset of arrays represents a column of the RLE encoded matrix. Otherimplementations of this aspect include corresponding systems, apparatus,and computer programs, configured to perform the actions of the methods,encoded on computer storage devices.

In another general aspect, innovative aspects of the subject matterdescribed in this specification can be embodied in methods that includeactions of compressing, rows of data stored in a first matrix using runlength encoding (RLE) to produce an RLE encoded matrix, wherein eachcell of the RLE encoded matrix includes an RLE cell value comprising adata value from the first matrix and an associated count value thatrepresents consecutive instances of a respective data value in acorresponding row of the first matrix. Compressing columns of the RLEencoded matrix into a set of arrays by representing each column of theRLE encoded matrix as an array. The array includes, for each differentdata value in a column of the RLE encoded matrix: the data value fromthe column, and a set of respective difference values that represent adifferential change in count values associated with the data value inconsecutive cells of the column. Other implementations of this aspectinclude corresponding systems, apparatus, and computer programs,configured to perform the actions of the methods, encoded on computerstorage devices.

These and other implementations can each optionally include one or moreof the following features.

Some implementations can include determining a minimum number of bitsrequired to represent data values and differentially encoded data countvalues in the arrays, and storing each of the data values and thedifferentially encoding data count values using the determined minimumnumber of bits.

Some implementations can include compressing the set of arrays using ZIPcompression.

In some implementations, the first matrix is a spatial map of ageographic area and the data stored in the first matrix representsregions within the spatial map.

In some implementations, a compression ratio between the set of arraysand the first matrix is at least 500:1. In some implementations, acompression ratio between the set of arrays and the first matrix is atleast 900:1. In some implementations, a compression ratio between theset of arrays and the first matrix is at least 1000:1.

Particular implementations of the subject matter described in thisspecification can be implemented so as to realize one or more of thefollowing advantages. Implementations may improve the efficiency withwhich computing devices process spatial data, for example, geographicmaps, map overlays, and images. Implementations may reduce the amount ofcomputer memory required for storing large data matrices.Implementations may reduce the network bandwidth required fortransmitting large data matrices between computing devices.Implementations may improve the efficiency with which computing devicesrender graphics related to large data matrices. Implementations mayimprove the efficiency of performing mathematical operations on largedata matrices. Implementations may improve the efficiency with whichmatrix data is saved and loaded by computing devices.

The details of one or more implementations of the subject matterdescribed in this specification are set forth in the accompanyingdrawings and the description below. Other features, aspects, andadvantages of the subject matter will become apparent from thedescription, the drawings, and the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A shows an example of spatial data that can be represented by adata matrix;

FIG. 1B shows an example data matrix overlaid on the spatial data ofFIG. 1A;

FIG. 2 is a flow chart of an example process for compressing a datamatrix; and

FIG. 3 is a table of experimental results showing improvements in theefficiency of processing data matrices that are compressed in accordancewith implementations of the present disclosure.

DETAILED DESCRIPTION

Implementations of the present disclosure generally relate to techniquesfor efficiently processing data represented in matrix form. Morespecifically, implementations of the present specification relate totechniques for processing data matrices that contain repetitive data.Implementations take advantage of repetitive data to compress both rowsand columns of a matrix into a highly compact set of arrays. Forexample, matrix data can be compressed along the rows of the matrixusing a first compression technique to produce a compressed matrix. Thedata in the compressed matrix can then be compressed along the columnsof the compressed matrix using a second compression technique.

In some examples, the matrix data can first be compressed using runlength encoding (RLE). Then the compressed matrix (RLE encoded data) canbe compressed using differential encoding.

In some implementations, the matrix data can be compressed, first, alongcolumns of the matrix using the first compression technique, and thedata in the compressed matrix can then be compressed along rows of thecompressed matrix using the second compression technique.

Implementations of the present disclosure will be discussed in furtherdetail with reference to an example context. The example contextincludes a geographical information system (GIS) for logistics planning.A GIS is a computing system that uses spatial data to optimize packagesorting and truck loading for efficient package delivery. It isappreciated, however, that implementations of the present disclosure canbe realized in other appropriate contexts, for example, geographicmapping, route planning, real estate analysis, urban planning, naturalresource mapping and research (e.g., watershed mapping and evaluation,oil and mineral research and evaluation), and scientific research (e.g.,mapping and evaluating animal migration patterns).

Turning to the figures, FIG. 1A shows an example of spatial data, a map100, that can be represented by a data matrix. The map 100 includes fourgeographic regions 102A-102D that represent package delivery areas for alogistics company. The regions 102A-102D are non-overlapping polygonsdefined by dashed lines 104. For example, a different delivery drivermay be assigned to each of the regions 102A-102D.

Furthermore, each of the dots 106 represent a package delivery location.For example, a GIS can identify delivery locations for the packaging andthe region in which each delivery location lies in order to properlysort and load incoming packages on the correct delivery vehicles. TheGIS can use the map 100 to, for example, determine the volume ofpackages to be delivered in each region and ensure that the deliveryvehicle(s) assigned to each region have sufficient capacity to deliverall of the packages.

More specifically, the GIS can process delivery data (e.g., locationaddresses) for each of the incoming packages during a delivery period(e.g., each day) to determine the package volume that needs to bedistributed within each of the regions 102A-102D. On occasion it may beadvantageous to re-map the regions 102A-102D or add additional packagedelivery regions to, for example, accommodate the capacity of deliveryvehicles. For example, region 102A includes twenty-two package deliverylocations while region 102C includes only three package deliverylocations. Furthermore, several of the package delivery locations(locations 108) are near the border between region 102A and 102C.Therefore, the GIS may optimize the package delivery logistics byshifting the border between region 102A and 102C upwards such thatlocations 108 are shifted to region 102C.

The GIS can perform the above-described processes by representing thespatial regions 102A-102D as a matrix and identifying delivery locationpoints using a point-in polygon analysis. FIG. 1B shows an example datamatrix 150 overlaid on the map 100 of FIG. 1A. The locations on the map100 are represented by the cells of the matrix 150 and thenon-overlapping polygons (regions 102A-102D) are represented by the datavalues (e.g., cell or pixel values) of the matrix 150. Morespecifically, map coordinates (e.g., longitude and latitude or gridcoordinates) can be mapped to corresponding indices (e.g., rows andcolumns) of the matrix 150. The data values of the matrix (e.g., A, B,C, D) represent the identity of the regions (102A-102D) in whichparticular locations lie. For example, the latitude and longitude oflocation 152 may correspond to Row 7, Column 12 of the matrix 150. Thedata value of the matrix 150 at [7, 12] is “C” indicating that location152 lies in Region 102C.

Using this method, the GIS can quickly identify the geographic regions102A-102D in which large numbers of geographic locations lie. Forexample, delivery addresses for thousands of packages can quickly becategorized into delivery regions to facilitate accurate and efficientpackage sorting and loading. Moreover, regions can be revised andlocations re-categorized by changing the data values of matrix 150cells. For example, if, as discussed above, a logistics operationmanager wanted to alter the boundary between regions 102A and 102C inorder to move locations 108 of FIG. 1A into region 102C, the GIS systemcould perform such an alteration by changing the values of cells [4,10], [4, 11], [4, 12], and [4, 13] from “A” to “C.”

Furthermore, additional spatial matrix operations can be performed usingspatial data matrices including, but not limited to, identifying unionsbetween areas of two matrices, identifying intersections between twomatrices, computing difference regions between two matrices, computing asymmetric difference between two matrices, generating point density maps(e.g., heat maps and radius evaluations), and performing topologyvalidity (e.g., coverage evaluation and overlap detection). For example,non-existence of overlapping polygons may be a requirement in thecontext of implementations of the present disclosure. Uncovered areascan be identified by computing the difference between a matrix thatrepresents the area to be covered and a matrix representing a givenpolygon fabric.

Spatial data matrices that cover large areas or provide high resolutiondata can become excessively large. For example, a spatial data matrixrepresenting a raw logistics map overlay for a 100,000 meter by 100,000meter area can be 10 GB of data. These large data sizes can result insignificant increases in processing time and bandwidth constraints on aGIS when performing operations on the matrices, storing the matrices,loading the matrices, and transmitting the matrices between computingdevices (e.g., computers, servers, notebooks, tablets, etc.). Therefore,the matrices are compressed to reduce the memory required to store thematrices and to improve the efficiency with which computing devices canprocess the matrices. In some implementations, the matrices arecompressed in a manner that allows at least some of the spatial matrixoperations discussed above to be performed without the need todecompress the matrices into a raw (uncompressed) format.

FIG. 2 shows a flow chart of an example process 200 for compressing adata matrix 210 that can be executed in accordance with implementationsof the present disclosure. In some implementations, the example process200 can be realized using one or more computer-executable programs thatare executed using one or more computing devices (e.g., a GIS). In someimplementations, the example process 200 can be used for compressingmatrices of spatial data such as logistic operation maps.

A raw data matrix 210 is received (204). For example, the data matrix210 can include data that is highly repetitive. The data matrix 210 is a“raw” (e.g., uncompressed) matrix of data values. The data matrix 210can, for example, include data representing spatial regions such asgeographic map overlays including, but not limited to, logistic planningdata (e.g., logistic operation regions), natural resource data, urbanplanning data (e.g., population data, zoning data), and real estateanalysis data (e.g., school districts, neighborhoods). In some examples,the received data matrix 210 can include 10 GB or more of data.

Data in the rows of the data matrix 210 is compressed using a firstcompression method to produce a compressed matrix. For example, datastored in the rows of the data matrix 210 is compressed using RLE toproduce an RLE encoded matrix 212 (206). For example, the data values inRow 1 of data matrix 210 can be represented by the data value and thenumber of consecutive times that the data value occurs in the row (e.g.,the data count or run length). For example, in Row 1 of data matrix 210the value “A” (e.g., logistic region A) occurs 3 times, followed by thevalue “B” 8 times, and the value “C” 4 times. Therefore, Row 1 of datamatrix 210 is encoded as shown in Row 1 of the RLE encoded matrix 212(i.e., A(3) B(8) C(4)), where the number in parenthesis represents thedata count value (or run length) for each individual data value in Row 1of data matrix 210. Rows 1, 6, and 7 of Column 4 in the RLE encodedmatrix 212 is null because, for example, the corresponding Rows 1, 6,and 7 of the data matrix 210 include fewer different data values thanother rows (e.g., Rows 2-5) of the data matrix 210.

Data in the columns of the compressed data matrix are compressed using asecond compression method to produce a set of arrays. For example, datain the columns of the RLE encoded matrix 212 is compressed into a set ofarrays 214 (208). The data in each column of the RLE encoded matrix 212is compressed by differentially encoding the data count values of eachsubsequent row in the column. For example, the array for Column 1 of theRLE encoded matrix 212 includes the first data value “A” followed by aseries of numbers representing the count values associated with the datavalue “A” in each row of Column 1 from the RLE encoded matrix.

Specifically, the first number after the data value “A” (e.g., 3)represents the actual count value associated with “A” in Row 1, Column 1of the RLE encoded matrix 212. Then each subsequent number representsthe differential change in count values between consecutive subsequentand prior cells of the RLE encoded matrix 212 column being compressed.That is, each differentially encoded value for a column array can berepresented by C[i]=RLE [i]−RLE [i−1], where C[i] represents the i-thdifferentially encoded count value of an array and RLE[i−1] and RLE[i]represent the count value of the (i−1)-th and i-th rows of the RLEencoded matrix 212.

For example, the Rows 1-7 of the Column 1 of the RLE encoded matrix 212are as follows: A(3), A(4), A(5), A(6), A(6), A(6), and A(6). Therefore,compressing this data into the differentially encoded array for Column 1yields “A” (the data value) followed by “3” (the first count valueassociated with “A”), then the series “1, 1, 1, 0, 0, 0,” representingthe difference between each subsequent count value associated with thedata value “A.”

As another example, the Rows 1-7 of the Column 2 of the RLE encodedmatrix 212 are as follows: B(8), B(6), B(4), B(2), B(1), C(5), and C(5).Therefore, compressing this data into the differentially encoded arrayfor Column 2 yields “B” (the first data value) followed by “8” (thefirst count value associated with “B”), then the series “8, −2, −2, −2,−1,” representing the difference between each subsequent count valueassociated with the data value “A,” then “C” (the second data valueincluded in Column 2) followed by “5” (the first count value associatedwith “C”), then “0” representing the difference between the count valueassociated with “C” between Rows 7 and 8 of Column 2.

The compressed array representing Column 4 of the RLE encoded matrix 212includes placeholders (0(1)) and (0(1,0)) to indicate that some of therows (e.g., Rows 1, 6, and 7) from Column 4 of the RLE encoded matrixare null. That is, those rows did not include any RLE data because, forexample, the corresponding rows of the raw data matrix 210 includedfewer different data values than other rows of the raw data matrix 210.

In some implementations, a minimum number of bits required to representdata in the set of arrays 214 can be determined and the arrays 214 canbe further compressed by reducing the number of bits required to storethe data contained therein. For example, a minimum number of bits orbytes required to store the data values, the difference values, or bothincluded in the set of arrays 214 can be determined. Differentiallyencoding the RLE data count values will generally result in thedifferentially encoded data having a smaller magnitude than the originalRLE count values.

For example, referring to Column 1 of the RLE encoded matrix 212 thedata count values are 3, 4, 5, and 6, each of which requires two or morebits to be represented as binary data. The value 3 requires two bits(e.g., 3=11b), and the values 4, 5, and 6 each require 3 bits (e.g.,4=100b, 5=101b, and 6=110b). However, when differentially encoded in theCol. 1 array, the differentially encoded data can be represented by only1 bit. For example, the differentially encoded values in the Col. 1array are only 1's and 0's, which can be represented by only 1 bit each.Thus, these differentially encoded values can each be further compressedby using only 1 bit each to store them.

In some implementations, a matrix can be compressed, first, alongcolumns of the matrix using the first compression technique (e.g., RLE),and the data in the compressed matrix can then be compressed along rowsof the compressed matrix using the second compression technique (e.g.,differential encoding).

In some implementations, a matrix that has been compressed to a set ofarrays is uncompressed to the raw matrix state to perform spatial matrixoperations such as those discussed above. In some implementations,matrix point look ups can be performed on a compressed matrix byuncompressing the matrix only to the RLE encoded matrix state. For agiven set of N different data values, the average number of columns inthe RLE is √{square root over (N)}. Point lookups using the RLE can bedone in constant time proportional to

$\frac{\sqrt{N}}{2}$regardless of the number of rows in the RLE.

In some implementations, the set of arrays 214 can be further compressedusing a third compression method. For example, the arrays 214 can becompressed using a lossless compression method such as ZIP compressionto take advantage of the high repetitiveness in the set of arrays 214.

In examples implementations, the above described techniques can yield acompression ratio between the set of arrays and the first matrix of atleast 500:1. In examples implementations, the above described techniquescan yield a compression ratio between the set of arrays and the firstmatrix of at least 900:1. In examples implementations, the abovedescribed techniques can yield a compression ratio between the set ofarrays and the first matrix of at least 1000:1. For example, in betatesting the above techniques have reduced matrix ranging between 1 GBand 3 GB in size to between 500 kB and 3 MB in size.

FIG. 3 is a table 300 of experimental results showing improvements inthe efficiency of processing data matrices that are compressed inaccordance with implementations of the present disclosure. The table 300lists the results from beta testing of a GIS submission process forlogistic maps compressed according to implementations disclosed herein.Specifically, the table 300 compares submission times (in seconds) ofthe GIS system for logistic maps that are not compressed (Legacy) tosubmission times for logistic maps that are compressed according toimplementations of the present specification (Compressed Matrix). Forexample, GIS station 752 experienced a reduction in map submission timeof 486.56 seconds from 502.5 seconds to 15.94 seconds representing anoverall improvement in processing efficiency of 96.83%.

Implementations of the subject matter and the functional operationsdescribed in this specification can be implemented in digital electroniccircuitry, in tangibly-implemented computer software or firmware, incomputer hardware, including the structures disclosed in thisspecification and their structural equivalents, or in combinations ofone or more of them. Implementations of the subject matter described inthis specification can be implemented as one or more computer programs,i.e., one or more modules of computer program instructions encoded on atangible non transitory program carrier for execution by, or to controlthe operation of, data processing apparatus. The computer storage mediumcan be a machine-readable storage device, a machine-readable storagesubstrate, a random or serial access memory device, or a combination ofone or more of them.

The term “data processing apparatus” refers to data processing hardwareand encompasses all kinds of apparatus, devices, and machines forprocessing data, including, by way of example, a programmable processor,a computer, or multiple processors or computers. The apparatus can alsobe or further include special purpose logic circuitry, e.g., a centralprocessing unit (CPU), a FPGA (field programmable gate array), or anASIC (application specific integrated circuit). In some implementations,the data processing apparatus and/or special purpose logic circuitry maybe hardware-based and/or software-based. The apparatus can optionallyinclude code that creates an execution environment for computerprograms, e.g., code that constitutes processor firmware, a protocolstack, a database management system, an operating system, or acombination of one or more of them. The present disclosure contemplatesthe use of data processing apparatuses with or without conventionaloperating systems, for example Linux, UNIX, Windows, Mac OS, Android,iOS or any other suitable conventional operating system

A computer program, which may also be referred to or described as aprogram, software, a software application, a module, a software module,a script, or code, can be written in any form of programming language,including compiled or interpreted languages, or declarative orprocedural languages, and it can be deployed in any form, including as astand-alone program or as a module, component, subroutine, or other unitsuitable for use in a computing environment. A computer program may, butneed not, correspond to a file in a file system. A program can be storedin a portion of a file that holds other programs or data, e.g., one ormore scripts stored in a markup language document, in a single filededicated to the program in question, or in multiple coordinated files,e.g., files that store one or more modules, sub programs, or portions ofcode. A computer program can be deployed to be executed on one computeror on multiple computers that are located at one site or distributedacross multiple sites and interconnected by a communication network.While portions of the programs illustrated in the various figures areshown as individual modules that implement the various features andfunctionality through various objects, methods, or other processes, theprograms may instead include a number of submodules, third partyservices, components, libraries, and such, as appropriate. Conversely,the features and functionality of various components can be combinedinto single components as appropriate

The processes and logic flows described in this specification can beperformed by one or more programmable computers executing one or morecomputer programs to perform functions by operating on input data andgenerating output. The processes and logic flows can also be performedby, and apparatus can also be implemented as, special purpose logiccircuitry, e.g., a central processing unit (CPU), a FPGA (fieldprogrammable gate array), or an ASIC (application specific integratedcircuit

Computers suitable for the execution of a computer program include, byway of example, can be based on general or special purposemicroprocessors or both, or any other kind of central processing unit.Generally, a central processing unit will receive instructions and datafrom a read only memory or a random access memory or both. The essentialelements of a computer are a central processing unit for performing orexecuting instructions and one or more memory devices for storinginstructions and data. Generally, a computer will also include, or beoperatively coupled to receive data from or transfer data to, or both,one or more mass storage devices for storing data, e.g., magnetic,magneto optical disks, or optical disks. However, a computer need nothave such devices. Moreover, a computer can be embedded in anotherdevice, e.g., a mobile telephone, a personal digital assistant (PDA), amobile audio or video player, a game console, a Global PositioningSystem (GPS) receiver, or a portable storage device, e.g., a universalserial bus (USB) flash drive, to name just a few

Computer readable media (transitory or non-transitory, as appropriate)suitable for storing computer program instructions and data include allforms of non-volatile memory, media and memory devices, including by wayof example semiconductor memory devices, e.g., EPROM, EEPROM, and flashmemory devices; magnetic disks, e.g., internal hard disks or removabledisks; magneto optical disks; and CD ROM and DVD-ROM disks. The memorymay store various objects or data, including caches, classes,frameworks, applications, backup data, jobs, web pages, web pagetemplates, database tables, repositories storing business and/or dynamicinformation, and any other appropriate information including anyparameters, variables, algorithms, instructions, rules, constraints, orreferences thereto. Additionally, the memory may include any otherappropriate data, such as logs, policies, security or access data,reporting files, as well as others. The processor and the memory can besupplemented by, or incorporated in, special purpose logic circuitry

To provide for interaction with a user, implementations of the subjectmatter described in this specification can be implemented on a computerhaving a display device, e.g., a CRT (cathode ray tube), LCD (liquidcrystal display), or plasma monitor, for displaying information to theuser and a keyboard and a pointing device, e.g., a mouse or a trackball,by which the user can provide input to the computer. Other kinds ofdevices can be used to provide for interaction with a user as well; forexample, feedback provided to the user can be any form of sensoryfeedback, e.g., visual feedback, auditory feedback, or tactile feedback;and input from the user can be received in any form, including acoustic,speech, or tactile input. In addition, a computer can interact with auser by sending documents to and receiving documents from a device thatis used by the user; for example, by sending web pages to a web browseron a user's client device in response to requests received from the webbrowser.

Implementations of the subject matter described in this specificationcan be implemented in a computing system that includes a back endcomponent, e.g., as a data server, or that includes a middlewarecomponent, e.g., an application server, or that includes a front endcomponent, e.g., a client computer having a graphical user interface ora Web browser through which a user can interact with an implementationof the subject matter described in this specification, or anycombination of one or more such back end, middleware, or front endcomponents. The components of the system can be interconnected by anyform or medium of digital data communication, e.g., a communicationnetwork. Examples of communication networks include a local area network(LAN), a wide area network (WAN), e.g., the Internet, and a wirelesslocal area network (WLAN).

The computing system can include clients and servers. A client andserver are generally remote from each other and typically interactthrough a communication network. The relationship of client and serverarises by virtue of computer programs running on the respectivecomputers and having a client-server relationship to each other

While this specification contains many specific implementation details,these should not be construed as limitations on the scope of anyinvention or on the scope of what may be claimed, but rather asdescriptions of features that may be specific to particularimplementations of particular inventions. Certain features that aredescribed in this specification in the context of separateimplementations can also be implemented in combination in a singleimplementation. Conversely, various features that are described in thecontext of a single implementation can also be implemented in multipleimplementations separately or in any suitable sub-combination. Moreover,although features may be described above as acting in certaincombinations and even initially claimed as such, one or more featuresfrom a claimed combination can in some cases be excised from thecombination, and the claimed combination may be directed to a subcombination or variation of a sub-combination.

Similarly, while operations are depicted in the drawings in a particularorder, this should not be understood as requiring that such operationsbe performed in the particular order shown or in sequential order, orthat all illustrated operations be performed, to achieve desirableresults. In certain circumstances, multitasking and parallel processingmay be helpful. Moreover, the separation of various system modules andcomponents in the implementations described above should not beunderstood as requiring such separation in all implementations, and itshould be understood that the described program components and systemscan generally be integrated together in a single software product orpackaged into multiple software products.

While this document contains many specific implementation details, theseshould not be construed as limitations on the scope of what may beclaimed, but rather as descriptions of features that may be specific toparticular implementations or embodiments. Certain features that aredescribed in this specification in the context of separate embodimentscan also be implemented in combination in a single embodiment.Conversely, various features that are described in the context of asingle embodiment can also be implemented in multiple embodimentsseparately or in any suitable sub combination. Moreover, althoughfeatures may be described above as acting in certain combinations andeven initially claimed as such, one or more features from a claimedcombination can, in some cases, be excised from the combination, and theclaimed combination may be directed to a sub combination or variation ofa sub combination.

The invention claimed is:
 1. A computer-implemented method for improvingcomputational efficiency with which a computer can compress data storedin a matrix, the method comprising: compressing, by one or moreprocessors, rows of data stored in a first matrix using run lengthencoding (RLE) to produce an RLE encoded matrix; and compressing, by theone or more processors, columns of the RLE encoded matrix into a set ofarrays by differentially encoding data count values of the RLE encodedmatrix, wherein each array in the set of arrays represents a column ofthe RLE encoded matrix.
 2. The method of claim 1, further comprising:determining a minimum number of bits required to represent data valuesand differentially encoded data count values in the arrays; and storingeach of the data values and the differentially encoding data countvalues using the determined minimum number of bits.
 3. The method ofclaim 1, further comprising compressing the set of arrays using ZIPcompression.
 4. The method of claim 1, wherein the first matrix is aspatial map of a geographic area and the data stored in the first matrixrepresents regions within the spatial map.
 5. The method of claim 1,wherein a compression ratio between the set of arrays and the firstmatrix is at least 500:1.
 6. The method of claim 1, wherein acompression ratio between the set of arrays and the first matrix is atleast 900:1.
 7. The method of claim 1, wherein a compression ratiobetween the set of arrays and the first matrix is at least 1000:1.
 8. Acomputer-implemented method for improving computational efficiency withwhich a computer can compress data stored in a matrix, the methodcomprising: compressing, by one or more processors, rows of data storedin a first matrix using run length encoding (RLE) to produce an RLEencoded matrix, wherein each cell of the RLE encoded matrix includes anRLE cell value comprising a data value from the first matrix and anassociated count value that represents consecutive instances of arespective data value in a corresponding row of the first matrix; andcompressing, by the one or more processors, columns of the RLE encodedmatrix into a set of arrays by representing each column of the RLEencoded matrix as an array comprising, for each different data value ina column: the data value from the column, and a set of respectivedifference values that represent a differential change in count valuesassociated with the data value in consecutive cells of the column. 9.The method of claim 8, further comprising: determining a minimum numberof bits required to represent the data values and the difference valuesin the arrays; and storing each of the data values and the differencevalues using the determined minimum number of bits.
 10. The method ofclaim 8, further comprising compressing the set of arrays using ZIPcompression.
 11. The method of claim 8, wherein the first matrix is aspatial map of a geographic area and the data stored in the first matrixrepresents regions within the spatial map.
 12. The method of claim 8,wherein a compression ratio between the set of arrays and the firstmatrix is at least 500:1.
 13. The method of claim 8, wherein acompression ratio between the set of arrays and the first matrix is atleast 900:1.
 14. The method of claim 8, wherein a compression ratiobetween the set of arrays and the first matrix is at least 1000:1.
 15. Anon-transitory computer readable storage medium storing instructionsthat, when executed by one or more processors, cause the one or moreprocessors to perform operations comprising: compressing rows of datastored in a first matrix using run length encoding (RLE) to produce anRLE encoded matrix; and compressing columns of the RLE encoded matrixinto a set of arrays by differentially encoding data count values of theRLE encoded matrix, wherein each array in the set of arrays represents acolumn of the RLE encoded matrix.
 16. The medium of claim 15, furthercomprising: determining a minimum number of bits required to representthe data values and the differentially encoding data count values in thearrays; and storing each of the data values and the differentiallyencoding data count values using the determined minimum number of bits.17. The medium of claim 15, further comprising compressing the set ofarrays using ZIP compression.
 18. The medium of claim 15, wherein thefirst matrix is a spatial map of a geographic area and the data storedin the first matrix represents regions within the spatial map.
 19. Themedium of claim 15, wherein a compression ratio between the set ofarrays and the first matrix is at least 500:1.
 20. A non-transitorycomputer readable storage medium storing instructions that, whenexecuted by one or more processors, cause the one or more processors toperform operations comprising: compressing, by one or more processors,rows of data stored in a first matrix using run length encoding (RLE) toproduce an RLE encoded matrix, wherein each cell of the RLE encodedmatrix includes an RLE cell value comprising a data value from the firstmatrix and an associated count value that represents consecutiveinstances of a respective data value in a corresponding row of the firstmatrix; and compressing, by the one or more processors, columns of theRLE encoded matrix into a set of arrays by representing each column ofthe RLE encoded matrix as an array comprising, for each different datavalue in a column: the data value from the column, and a set ofrespective difference values that represent a differential change incount values associated with the data value in consecutive cells of thecolumn.